package com.shop.utils.common.enums;


public enum Code {

    TEST1(400,"问题1"),
    TEST2(400,"问题2"),
    TEST3(400,"问题3"),
    TEST4(400,"问题4"),
    TEST5(400,"问题5"),
    TEST6(400,"问题6"),
    TEST7(400,"问题7"),
    TEST8(400,"问题8"),
    TEST9(400,"问题9"),
    TEST10(400,"问题10"),


    // 成功段固定为200
    SUCCESS(200,"操作成功"),
    // 登录段1~50
    NEED_LOGIN(1,"需要登录后操作"),
    LOGIN_PASSWORD_ERROR(2,"密码错误"),
    // TOKEN50~100
    TOKEN_INVALID(50,"无效的TOKEN"),
    TOKEN_EXPIRE(51,"TOKEN已过期"),
    TOKEN_REQUIRE(52,"TOKEN是必须的"),
    // 参数错误 500~1000
    PARAM_REQUIRE(500,"缺少参数"),
    PARAM_INVALID(501,"无效参数"),
    PARAM_IMAGE_FORMAT_ERROR(502,"图片格式有误"),
    SERVER_ERROR(503,"操作失败"),
    // 数据错误 1000~2000
    DATA_EXIST(1000,"数据已经存在"),
    DATA_NOT_EXIST(1002,"数据不存在"),
    // 数据错误 3000~3500
    NO_OPERATOR_AUTH(3000,"无权限操作"),
    NEED_ADMIND(3001,"需要管理员权限"),

    // 自媒体文章错误 3501~3600
    MATERIASL_REFERENCE_FAIL(3501,"素材引用失效"),
    //登录失败
    LOGIN_FALES(3,"登录失败");


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getSuccess() {
        return success;
    }

    public void setSuccess(String success) {
        this.success = success;
    }

    int code;
    String success;

    Code(int code,String success){
        this.code=code;
        this.success=success;
    }
}
